<template>
    <div style="width:420px;height:250px" ref="chart"></div>
</template>

<script>
import * as echarts from 'echarts'
export default {
    mounted(){
       let chart=echarts.init(this.$refs.chart)
       let options={
         series:[
            {
              radius:[0,'35%'],
              type:'pie',
              label:{
                normal:{
                    position:'inner'
                }
              },
              data:[
                {
                    name:'餐饮',
                    value:3000,
                },
                {
                    name:'交通',
                    value:5000
                },
                {
                    name:'旅游',
                    value:10000
                }
              ]    
            },
            {
                type:'pie',
                radius: ["36%", "65%"],
                 label:{
                normal:{
                    position:'inner'
                }
              },
                data:[
                    {
                        name:'中餐',
                        value:1000
                    },
                    {
                        name:'西餐',
                        value:1500
                    },
                    {
                        name:'快餐',
                        value:500
                    },
                    {
                        name:'公交车',
                        value:400
                    },
                    {
                        name:'地铁',
                        value:600
                    },
                    {
                        name:'高铁',
                        value:2000
                    },
                    {
                        name:'飞机',
                        value:2000
                    },
                    {
                        name:'国内',
                        value:4000
                    },
                    {
                        name:'国外',
                        value:6000
                    }
                ]
            }
         ]
       }
       chart.setOption(options)
    }
}
</script>

<style>

</style>